package api.homework02;

import java.util.Arrays;

public class StringDemo {
    public static void main(String[] args) {
        String email = "1029213230@qq.com";
        String regex = "[a-zA-Z0-9_]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
        boolean a = email.matches(regex);
        System.out.println(a);


        String str = "aslkdjiwaoirjaskdnmzxidhrfkasjdo";
        str = str.replaceAll("(ask)","****");
        System.out.println(str);


        String str2 = "www.23123213.ssss.cn";
        String[] str3 = str2.split("\\.");
        System.out.println(Arrays.toString(str3));

    }
}
